public class Sum {
    public int takeAttendance(int[] records) {
        int sum = 0;
        for (int i : records) {
            sum += i;
        }
        int n = records.length;
        int sum1 = (0 + n) * (n + 1) / 2;
        return sum1 - sum;
    }
}
